/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pruebas;

import java.util.Scanner;

/**
 *
 * @author ddpc
 */
public class arrayintprueba {
    Scanner teclado;
    int [] arr;
    
    public void insertar(){
        arr = new int[8];
        teclado = new Scanner(System.in);
        for (int i = 0; i < arr.length; i++) {
            System.out.println("introduce numero: ");
            arr[i]=teclado.nextInt();
        }
    }
    public void sumas(){
        int suma=0,sumamay=0,contar=0;
        for (int i = 0; i < arr.length; i++) {
            suma = suma+arr[i];
            if(arr[i]>36){
                sumamay=sumamay+arr[i];
            }
            if(arr[i]>50){
                contar = contar+1;
            }
        }
        System.out.println("la suma de todos los valores es: "+suma+" la de los mayores de 36 es: "+sumamay+" y hay: "+contar+" que son mayores de 50");
    }
    public static void main(String[] args) {
        arrayintprueba x = new arrayintprueba();
        x.insertar();
        x.sumas();
    }
}
